import React from 'react'
import { RouteComponentProps, withRouter } from 'react-router-dom'
import { useDispatch } from 'react-redux'
import { updateTest } from '../../../store/app/actions'
// import styles from './index.module.scss'


interface PropsInterface extends RouteComponentProps {

}

const AdminHome = (props: PropsInterface) => {

  const dispatch = useDispatch()

  const btnClick = () => {
    dispatch(updateTest(1))
  }

  return (
    <span>
      <button onClick={ btnClick }>按钮</button>
    </span>
  )
}

export default withRouter<PropsInterface>(AdminHome)